<template>
  <div id="wrap">
    <h1>路由基础知识点总结子组件3</h1>
    <p>{{ $route.query.id }}</p>
    <p>{{ $route.query.title }}</p>
    <p>{{ $route.query.content }}</p>
  </div>
</template>

<script lang="ts">
export default {
  name: 'StuDemo56Son03',
};
</script>

<script lang="ts" setup>
import { useRoute } from 'vue-router';
//useRoute:路由上下文，能够获取路由参数；useRouter路由对象：调用对象的方法
const route = useRoute(); //路由上下文，能够获取路由参数
console.log(route.query);
</script>

<style lang="scss"></style>
